package domain;

public class Operation extends ModelObject {
	
	private BalanceMonth balanceMonth;
	private Roommate roommateGiver;
	private Roommate roommateReceiver;
	private double amount;
	
	public Operation(Roommate roommateGiver, Roommate roommateReceiver, double amount, BalanceMonth balanceMonth) {
		this.roommateGiver = roommateGiver;
		this.roommateReceiver = roommateReceiver;
		this.amount = amount;
		this.balanceMonth = balanceMonth;
	}

	public Operation() {
	}

	/**
	 * @return the roommateGiver
	 */
	public Roommate getRoommateGiver() {
		return roommateGiver;
	}

	/**
	 * @param roommateGiver the roommateGiver to set
	 */
	public void setRoommateGiver(Roommate roommateGiver) {
		this.roommateGiver = roommateGiver;
	}

	/**
	 * @return the roommateReceiver
	 */
	public Roommate getRoommateReceiver() {
		return roommateReceiver;
	}

	/**
	 * @param roommateReceiver the roommateReceiver to set
	 */
	public void setRoommateReceiver(Roommate roommateReceiver) {
		this.roommateReceiver = roommateReceiver;
	}

	/**
	 * @return the amount
	 */
	public double getAmount() {
		return amount;
	}

	/**
	 * @param amount the amount to set
	 */
	public void setAmount(double amount) {
		this.amount = amount;
	}

	/**
	 * @return the balanceMonth
	 */
	public BalanceMonth getBalanceMonth() {
		return balanceMonth;
	}

	/**
	 * @param balanceMonth the balanceMonth to set
	 */
	public void setBalanceMonth(BalanceMonth balanceMonth) {
		this.balanceMonth = balanceMonth;
	}

	public Operation clone() {
		Operation newOperation = new Operation();
		newOperation.setId(getId());
		newOperation.setVersion(getVersion());
		newOperation.setAmount(getAmount());
		newOperation.setBalanceMonth(getBalanceMonth());
		newOperation.setRoommateGiver(getRoommateGiver());
		newOperation.setRoommateReceiver(getRoommateReceiver());
		return newOperation;
	}
}
